<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <title>学生成绩表格导出excel</title>
    <meta charset='utf-8'>

    <script src="../static/js/jquery.min.js"></script>
    <script src="../static/js/echarts.common.min.js"></script>
    <script src="../static/js/echartsOne.js"></script>
    <link rel="stylesheet" href="../static/css/jquery.datatables.min.css" />
    <link rel="stylesheet" href="../static/css/buttons.dataTables.min.css" />
    <link rel="shortcut icon" href="../resources/favicon.ico" th:href="@{/static/favicon.ico}"/>
    <style>
        tbody td {
            text-align: center;
        }
    </style>

</head>
<body>

<!-- 表格 -->
<table id="example" class="display" role="grid" aria-describedby="example_info">
    <thead>
    <tr>
        <th>授课班级</th>
        <th>课程名称</th>
        <th>授课教师</th>
        <th>操作</th>
    </tr>
    </thead>
    <tbody>
    <tr th:each="item:${lessonsList}">
        <td th:text="${item.getLes_cla()}"></td>
        <td th:text="${item.getLes_cou()}"></td>
        <td th:text="${item.getLes_tea()}"></td>
        <td>
            <span class="iconfont icon-bianjihdpi"><a href="../admin/modifyLessonsManagementController">编辑</a></span>/
            <span class="iconfont icon-cangpeitubiao_shanchu"><a href="#">删除</a></span>
        </td>
    </tr>
    </tbody>
    <tfoot>
    <tr>
        <th>授课班级</th>
        <th>课程名称</th>
        <th>授课教师</th>
        <th>操作</th>
    </tr>
    </tfoot>
</table>

<script src="../static/js/jquery.min.js"></script>
<script src="../static/js/jquery.datatables.min.js"></script>
<script src="../static/js/dataTables.buttons.min.js"></script>
<script src="../static/js/jszip.min.js"></script>
<script src="../static/js/buttons.html5.min.js"></script>
<script src="../static/js/buttons.flash.min.js"></script>
<script src="../static/js/pdfmake.min.js"></script>
<script src="../static/js/vfs_fonts.js"></script>
<script src="../static/js/buttons.print.min.js"></script>
<script>
    $(document).ready(function() {
        $('#example').DataTable({
            dom: 'Bfrtip',
            language: {
                emptyTable: '没有数据',
                loadingRecords: '加载中...',
                processing: '查询中...',
                search: '检索:',
                lengthMenu: '每页 _MENU_ 件',
                zeroRecords: '没有数据',
                paginate: {
                    'first': '第一页',
                    'last': '最后一页',
                    'next': '下一页',
                    'previous': '上一页'
                },
                info: '第 _PAGE_ 页 / 总 _PAGES_ 页',
                infoEmpty: '没有数据',
                infoFiltered: '(过滤总件数 _MAX_ 条)',
            },
            buttons: [
                {
                    extend: 'excelHtml5',
                    title: 'Data export'
                },
                {
                    extend: 'pdfHtml5',
                    title: 'Data export'
                }
            ]
        });

        $(".buttons-excel").text('导出到excel');
        $(".buttons-pdf").text('导出到pdf');
    });
</script>
</body>
</html>
